﻿Imports System.Data.SqlClient
Module KetNoi
    Public con As New SqlConnection
    Public str As String

    Public Sub KetNoiSQL()
        Try
            str = "Server=.\SQLEXPRESS;Database=QLNhapHang_BanHang;Integrated Security=true"
            If con.State = ConnectionState.Closed Then
                con.ConnectionString = str
                con.Open()
            End If
        Catch ex As Exception
            MsgBox("Kết nối không thành công !!!", MsgBoxStyle.Critical, "Thông báo")

        End Try
    End Sub

    
End Module
